import { COUNTER_DECREMENT, COUNTER_INCREMENT } from '../constants'

export const increment = (payload) => ({ type: COUNTER_INCREMENT, payload })

export const decrementAc = (payload) => ({
  type: COUNTER_DECREMENT,
  payload,
})

export const decrement = (payload) => {
  return (dispatch) => {
    setTimeout(() => {
      dispatch(decrementAc(payload))
    }, 1000)
  }
}
